#****************************************************************************
# Copyright (C) 2001,2002,2003,2004  PEAK System-Technik GmbH
#
# linux@peak-system.com
# www.peak-system.com
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Maintainer(s): Klaus Hitschler (klaus.hitschler@gmx.de)
#****************************************************************************

#****************************************************************************
#
# Makefile - Makefile for receivetest and transmittest programs
#
# $Log: Makefile,v $
# Revision 1.18  2004/10/24 18:13:09  klaus
# include path adjust to get test programs compiled on 'not yet installed' systems
#
# Revision 1.17  2004/08/15 15:00:12  klaus
# rpm building process improved again
#
# Revision 1.16  2004/08/15 09:46:27  klaus
# rpm building process improved
#
# Revision 1.15  2004/04/11 22:03:29  klaus
# cosmetic changes
#
# Revision 1.14  2004/04/11 22:03:28  klaus
# cosmetic changes
#
# Revision 1.13  2003/03/02 10:58:08  klaus
# merged USB thread into main path
#
# Revision 1.12  2003/03/02 10:58:07  klaus
# merged USB thread into main path
#
# Revision 1.11.2.2  2003/02/23 17:50:42  klaus
# adapted to gcc 3.2
#
# Revision 1.11.2.1  2003/02/05 23:12:19  klaus
# adapted to RedHat 7.2
#
# Revision 1.11  2002/08/20 20:06:24  klaus
# Corrected BTR0BTR1 calculation and functions
#
# Revision 1.10  2002/02/20 20:55:09  klaus
# added rpminstall for to manage rpm generation
#
# Revision 1.9  2002/02/19 19:21:01  klaus
# Corrections to circumvent using lib before installing it
#
# Revision 1.8  2002/02/11 18:26:32  klaus
# moved libpcan.h and pcan.h to new locations
#
#****************************************************************************

SRC     = src
INC     = -I. -I../lib -I../driver
LDLIBS  = -L../lib -L/lib -L/usr/lib -L/usr/local/lib

DBG     = -g
CFLAGS  = $(DBG) $(INC) $(LDLIBS)

TARGET1 = receivetest
FILES1  = $(SRC)/$(TARGET1).c $(SRC)/common.c

TARGET2 = transmitest
FILES2  = $(SRC)/$(TARGET2).cpp $(SRC)/common.c $(SRC)/parser.cpp

TARGET3 = bitratetest
FILES3  = $(SRC)/$(TARGET3).c $(SRC)/common.c

all:    $(TARGET1) $(TARGET2) $(TARGET3)

$(TARGET1): $(FILES1)
	$(CC) $(FILES1) $(CFLAGS) -o $(TARGET1) -L../lib -lpcan

$(TARGET2): $(FILES2)
	$(CC) $(FILES2) $(CFLAGS) -o $(TARGET2) -L../lib -lpcan -lstdc++
	
$(TARGET3): $(FILES3)
	$(CC) $(FILES3) $(CFLAGS) -o $(TARGET3) -L../lib -lpcan


clean:
	rm -f $(SRC)/*~ $(SRC)/*.o *~ $(TARGET1) $(TARGET2) $(TARGET3)
	
install:
	cp $(TARGET1) /usr/local/bin
	cp $(TARGET2) /usr/local/bin
	cp $(TARGET3) /usr/local/bin



